package com.hw.sasso.config;

import cn.dev33.satoken.config.SaSsoConfig;
import com.dtflys.forest.Forest;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;

/**
 * @program: sa-token-start
 * @description:
 * @author: hewei
 * @date: 2023-09-11 17:19
 **/

@Slf4j
@Configuration
public class ClientConfig {

    // 配置SSO相关参数
    @Autowired
    private void configSso(SaSsoConfig sso) {
        sso.setSendHttp(url -> {
            log.info("SSO ------ 发起请求：" + url);
            return Forest.get(url).executeAsString();
        });
    }

}
